package com.xtt.designPattern.future;

/**
 * 真实数据
 * @author Administrator
 * @description 
 * @createTime 2017年6月22日 下午2:15:45
 */
public class RealData implements Data{
	
	private String data;
	public RealData() {
		try {
			init();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

	private void init() throws InterruptedException {
		System.out.println("开始取realData。。");
		Thread.sleep(5000);
		System.out.println("realData获取完毕。。");
		this.data = "---真实数据---";
	}

	@Override
	public String getResult() throws InterruptedException {
		return data;
	}

}
